package com.project.movie.services;

import com.project.movie.dao.RoleRepository;
import com.project.movie.entities.Roles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleService {
    @Autowired
    RoleRepository roleRepository;

    public Roles save(Roles roles){
        return roleRepository.save(roles);
    }

    public List<Roles> getAll(){
        return roleRepository.findAll();
    }
}
